import { MockMethod } from "vite-plugin-mock"

export default [
  {
    url: "/dev-api/home/summary",
    timeout: 2000,
    method: "get",
    response: () => {
      return {
        "status": 200,
        "msg": "查询成功",
        "data": {
          "results|5": {
            "totalMaterialsNum": "@integer(5, 100)",
            "totalMaterialsMoney": "@float(1000, 10000,1,5)",
            "totalStoreMaterials": "@integer(0, 200)",
            "totalLendMaterials": "@integer(0, 200)",
            "totalScrapMaterials": "@integer(0, 200)",
          }
        }
      }
    }
  },
  {
    url: "/dev-api/home/lends",
    timeout: 2000,
    method: "get",
    response: () => {
      return {
        "status": 200,
        "msg": "查询成功",
        "data": {
          "results": {
            "xData": [
              "06-28", "06-29", "06-30", "07-01", "07-02",
              "07-03", "07-04", "07-05", "07-06", "07-07",
              "07-08", "07-09", "07-10", "07-11", "07-12",
              "07-13", "07-14", "07-15", "07-16", "07-17",
              "07-18", "07-19", "07-20", "07-21", "07-22",
              "07-23", "07-24", "07-25", "07-26", "07-27"
            ],
            "opticalCableList|30": ["@integer(0, 50)"],
            "opticalModuleList|30": ["@integer(0, 50)"],
            "oscilloscopeList|30": ["@integer(0, 50)"]
          }
        }
      }
    }
  },
  {
    url: "/dev-api/home/statistics",
    timeout: 2000,
    method: "get",
    response: () => {
      return {
        "status": 200,
        "msg": "查询成功",
        "data": {
          "results|5": [
            {
              "name": '@first',
              "value": "@integer(10, 1000)",
            }
          ]
        }
      }
    }
  },
] as MockMethod[]

